package com.oocl.heather.main;

import java.io.File;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.oocl.heather.Service.impl.Parser;
import com.oocl.heather.comparator.impl.CustomerIdComparator;
import com.oocl.heather.entity.Customer;
import com.oocl.heather.scanner.impl.ScannerTxt;
import com.oocl.heather.validator.IValidator;
import com.oocl.heather.validator.impl.Validator;

public class Client {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		File f = new File("customer.txt");//Text文件
		
		List<String> list=new ScannerTxt().scan(f);//input the txt
//		List<String> list1=new ArrayList<String>();
//		IValidator va=new Validator();
//		for (int i = 0; i < list.size(); i++) {
//			System.out.println("hh");
//			if(va.validator(list.get(i))){
//				list1.add(list.get(i));
//			}
//			System.out.println("hhs1");
//		}
//		System.out.println();
//		for (int i = 0; i < list1.size(); i++) {
//			System.out.println(list1.get(i));
//		}
		Parser pa=new Parser();
		CustomerIdComparator customerIdComparator=new CustomerIdComparator();
		Set<Customer> p=pa.parse(list, customerIdComparator);
		System.out.println(p);
		
		
	}

}
